package com.zzg.springboot.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.zzg.springboot.entity.enumerate.SexEnum;

@Entity(name="user")
@Table
public class UserEntity {
	@Id
	@GeneratedValue
	private Long id;
	@Column(name="name")
	private String name;
	@Column(name="pwd")
	private String pwd;
	@Column(name="address")
	private String address;
	@Column(name = "sex")
	@Enumerated(EnumType.ORDINAL) //枚举类型成员属性映射
	private SexEnum sex;
	@Column(name = "birthday")
	@Temporal(TemporalType.TIME) //时间格式类型
	private java.util.Date birthday;
	@Transient //非数据库表的字段的映射,ORM框架将忽略该属性
	private String message;
	
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPwd() {
		return pwd;
	}
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public SexEnum getSex() {
		return sex;
	}
	public void setSex(SexEnum sex) {
		this.sex = sex;
	}
	public java.util.Date getBirthday() {
		return birthday;
	}
	public void setBirthday(java.util.Date birthday) {
		this.birthday = birthday;
	}
	public UserEntity(){
		super();
	}
	
	public UserEntity(String name, String pwd, String address) {
		super();
		this.name = name;
		this.pwd = pwd;
		this.address = address;
	}
	
	
}

